package com.yunhuisu.service.impl;

import com.yunhuisu.mapper.BookMapper;
import com.yunhuisu.pojo.Books;
import com.yunhuisu.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    BookMapper bookMapper;

    public List<Books> findAllBook() {
        return bookMapper.findAllBook();
    }

    @Override
    public Books findByIdBook(int bookID) {
        return bookMapper.findByIdBook(bookID);
    }

    @Override
    public boolean addBook(Books books) {
        return bookMapper.addBook(books);
    }

    @Override
    public boolean updateBook(Books books) {
        return bookMapper.updateBook(books);
    }

    @Override
    public boolean byIdDeleteBook(int bookID) {
        return bookMapper.byIdDeleteBook(bookID);
    }
}
